﻿using J.Status.Application.Command.BookingCommand;
using MediatR;
using StatusService;

namespace J.Status.Application.Handler.BookingHandler
{
    public class GetPriceHandler : IRequestHandler<GetPriceCommand, object>
    {
        private readonly IBookingService _bookingService;

        public GetPriceHandler(IBookingService bookingService)
        {
            _bookingService = bookingService;
        }

        public async Task<object> Handle(GetPriceCommand request, CancellationToken cancellationToken)
        {
            return await _bookingService.GetPrice(request.roomNum);
        }
    }
}
